package com.wendy.common.core.errcode.menu;

import com.wendy.common.core.constant.HttpStatus;
import com.wendy.common.core.errcode.base.BaseError;

public class MenuError extends BaseError {


    public static MenuError ADD_ERROR = new MenuError("新增菜单%s失败，菜单名称已存在", HttpStatus.NOT_FOUND);
    public static MenuError ADD_HTTP_ERROR = new MenuError("新增菜单%s失败，地址必须以http(s)://开头", HttpStatus.ERROR);
    public static MenuError EDIT_ERROR = new MenuError("修改菜单%s失败，菜单名称已存在", HttpStatus.NOT_FOUND);
    public static MenuError EDIT_HTTP_ERROR = new MenuError("修改菜单%s失败，地址必须以http(s)://开头", HttpStatus.ERROR);
    public static MenuError EDIT_SELF_ERROR = new MenuError("修改菜单%s失败，上级菜单不能选择自己", HttpStatus.ERROR);
    public static MenuError DEL_SUB_ERROR = new MenuError("存在子菜单,不允许删除！", HttpStatus.WARN);
    public static MenuError DEL_IN_USED_ERROR = new MenuError("菜单已分配,不允许删除", HttpStatus.WARN);
    public MenuError() {
        super();
    }
    public MenuError(String msg, Integer code) {
        super(msg, code);
    }
}
